<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
  <database name="default" defaultIdMethod="none">
    <table name="I_GLJOURNAL">
      <column name="I_GLJOURNAL_ID" primaryKey="true" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="AD_CLIENT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="CLIENTVALUE" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="AD_ORGDOC_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ISACTIVE" primaryKey="false" required="false" type="CHAR" size="1" default="Y" autoIncrement="false"/>
      <column name="CREATED" primaryKey="false" required="false" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
      <column name="CREATEDBY" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="UPDATED" primaryKey="false" required="false" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
      <column name="UPDATEDBY" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="I_ISIMPORTED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="I_ERRORMSG" primaryKey="false" required="false" type="VARCHAR" size="2000" autoIncrement="false"/>
      <column name="PROCESSING" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
      <column name="PROCESSED" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="GL_JOURNALBATCH_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="BATCHDOCUMENTNO" primaryKey="false" required="false" type="VARCHAR" size="30" autoIncrement="false"/>
      <column name="BATCHDESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
      <column name="GL_JOURNAL_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="JOURNALDOCUMENTNO" primaryKey="false" required="false" type="VARCHAR" size="30" autoIncrement="false"/>
      <column name="POSTINGTYPE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
      <column name="C_ACCTSCHEMA_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ACCTSCHEMANAME" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false"/>
      <column name="C_DOCTYPE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="DOCTYPENAME" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false"/>
      <column name="GL_CATEGORY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="CATEGORYNAME" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false"/>
      <column name="C_PERIOD_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="GL_BUDGET_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="GL_JOURNALLINE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="LINE" primaryKey="false" required="false" type="DECIMAL" size="10" autoIncrement="false"/>
      <column name="DATEACCT" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
      <column name="AMTSOURCEDR" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="AMTACCTDR" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="AMTSOURCECR" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="AMTACCTCR" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="C_CURRENCY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ISO_CODE" primaryKey="false" required="false" type="CHAR" size="3" autoIncrement="false"/>
      <column name="CONVERSIONTYPEVALUE" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="C_CONVERSIONTYPE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="CURRENCYRATE" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="C_UOM_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="QTY" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="C_VALIDCOMBINATION_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ORGVALUE" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="AD_ORG_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ACCOUNT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ACCOUNTVALUE" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="AD_ORGTRX_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ORGTRXVALUE" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="PRODUCTVALUE" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="UPC" primaryKey="false" required="false" type="VARCHAR" size="30" autoIncrement="false"/>
      <column name="SKU" primaryKey="false" required="false" type="VARCHAR" size="30" autoIncrement="false"/>
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="BPARTNERVALUE" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="PROJECTVALUE" primaryKey="false" required="false" type="VARCHAR" size="40" autoIncrement="false"/>
      <column name="C_LOCTO_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_LOCFROM_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_SALESREGION_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="USER1_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="USER2_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="ISCREATENEWBATCH" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
      <column name="ISCREATENEWJOURNAL" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
      <foreign-key foreignTable="AD_ORG" name="ADORG_IGLJOURNAL" onDelete="setnull">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="ADORGTRX_IGLJOURNAL" onDelete="setnull">
        <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="ADORGDOC_IGLJOURNAL" onDelete="setnull">
        <reference local="AD_ORGDOC_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_IGLJOURNAL" onDelete="setnull">
        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_GLJOURNAL" onDelete="setnull">
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_IGLJOURNAL" onDelete="setnull">
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_IGLJOURNAL" onDelete="setnull">
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CONVERSIONTYPE" name="CCONVERSIONTYPE_IGLJOURNAL" onDelete="setnull">
        <reference local="C_CONVERSIONTYPE_ID" foreign="C_CONVERSIONTYPE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_IGLJOURNAL" onDelete="setnull">
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPE_IGLJOURNAL" onDelete="setnull">
        <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CEVALUEUSER1_IGLJOURNAL" onDelete="setnull">
        <reference local="USER1_ID" foreign="C_ELEMENTVALUE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELVALUEUSER2_IGLJOURNAL" onDelete="setnull">
        <reference local="USER2_ID" foreign="C_ELEMENTVALUE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELVALUEACCOUNT_IGLJOURNAL" onDelete="setnull">
        <reference local="ACCOUNT_ID" foreign="C_ELEMENTVALUE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_LOCATION" name="CLOCTO_IGLJOURNAL" onDelete="setnull">
        <reference local="C_LOCTO_ID" foreign="C_LOCATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_LOCATION" name="CLOCFROM_IGLJOURNAL" onDelete="setnull">
        <reference local="C_LOCFROM_ID" foreign="C_LOCATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PERIOD" name="CPERIOD_IGLJOURNAL" onDelete="setnull">
        <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_IGLJOURNAL" onDelete="setnull">
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_SALESREGION" name="CSALESREGION_IGLJOURNAL" onDelete="setnull">
        <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="CVALIDCOMBINATION_IGLJOURNAL" onDelete="setnull">
        <reference local="C_VALIDCOMBINATION_ID" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="GL_BUDGET" name="GLBUDGET_IGLJOURNAL" onDelete="setnull">
        <reference local="GL_BUDGET_ID" foreign="GL_BUDGET_ID"/>
      </foreign-key>
      <foreign-key foreignTable="GL_CATEGORY" name="GLCATEGORY_IGLJOURNAL" onDelete="setnull">
        <reference local="GL_CATEGORY_ID" foreign="GL_CATEGORY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="GL_JOURNAL" name="GLJOURNAL_IGLJOURNAL" onDelete="setnull">
        <reference local="GL_JOURNAL_ID" foreign="GL_JOURNAL_ID"/>
      </foreign-key>
      <foreign-key foreignTable="GL_JOURNALBATCH" name="GLJOURNALBATCH_IGLJOURNAL" onDelete="setnull">
        <reference local="GL_JOURNALBATCH_ID" foreign="GL_JOURNALBATCH_ID"/>
      </foreign-key>
      <foreign-key foreignTable="GL_JOURNALLINE" name="GLJOURBELLINE_IGLJOURNAL" onDelete="setnull">
        <reference local="GL_JOURNALLINE_ID" foreign="GL_JOURNALLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_OGLJOURNAL" onDelete="setnull">
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
      </foreign-key>
      <check>
        <rule><![CDATA[IsActive in ('Y','N')]]></rule>
      </check>
      <check>
        <rule><![CDATA[Processed in ('Y','N')]]></rule>
      </check>
    </table>
  </database>
